\(\int \frac {\tan ^6(e+f x)}{(a+b \tan ^2(e+f x))^2} \, dx\) [230]
Optimal result
Integrand size = 23, antiderivative size = 130 \[
\int \frac {\tan ^6(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=-\frac {x}{(a-b)^2}-\frac {a^{3/2} (3 a-5 b) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{2 (a-b)^2 b^{5/2} f}+\frac {(3 a-2 b) \tan (e+f x)}{2 (a-b) b^2 f}-\frac {a \tan ^3(e+f x)}{2 (a-b) b f \left (a+b \tan ^2(e+f x)\right )}
\]
[Out]
-x/(a-b)^2-1/2*a^(3/2)*(3*a-5*b)*arctan(b^(1/2)*tan(f*x+e)/a^(1/2))/(a-b)^2/b^(5/2)/f+1/2*(3*a-2*b)*tan(f*x+e)
/(a-b)/b^2/f-1/2*a*tan(f*x+e)^3/(a-b)/b/f/(a+b*tan(f*x+e)^2)
Rubi [A] (verified)
Time = 0.24 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.00, number of
steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3751, 481, 596, 536, 209, 211}
\[
\int \frac {\tan ^6(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=-\frac {a^{3/2} (3 a-5 b) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{2 b^{5/2} f (a-b)^2}+\frac {(3 a-2 b) \tan (e+f x)}{2 b^2 f (a-b)}-\frac {a \tan ^3(e+f x)}{2 b f (a-b) \left (a+b \tan ^2(e+f x)\right )}-\frac {x}{(a-b)^2}
\]
[In]
Int[Tan[e + f*x]^6/(a + b*Tan[e + f*x]^2)^2,x]
[Out]
-(x/(a - b)^2) - (a^(3/2)*(3*a - 5*b)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/(2*(a - b)^2*b^(5/2)*f) + ((3*a
- 2*b)*Tan[e + f*x])/(2*(a - b)*b^2*f) - (a*Tan[e + f*x]^3)/(2*(a - b)*b*f*(a + b*Tan[e + f*x]^2))
Rule 209
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])
Rule 211
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]
Rule 481
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-a)*e^(
2*n - 1)*(e*x)^(m - 2*n + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(b*n*(b*c - a*d)*(p + 1))), x] + Dist[e^
(2*n)/(b*n*(b*c - a*d)*(p + 1)), Int[(e*x)^(m - 2*n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[a*c*(m - 2*n + 1)
+ (a*d*(m - n + n*q + 1) + b*c*n*(p + 1))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0]
&& IGtQ[n, 0] && LtQ[p, -1] && GtQ[m - n + 1, n] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]
Rule 536
Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]
Rule 596
Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
x_Symbol] :> Simp[f*g^(n - 1)*(g*x)^(m - n + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(b*d*(m + n*(p + q +
1) + 1))), x] - Dist[g^n/(b*d*(m + n*(p + q + 1) + 1)), Int[(g*x)^(m - n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*
f*c*(m - n + 1) + (a*f*d*(m + n*q + 1) + b*(f*c*(m + n*p + 1) - e*d*(m + n*(p + q + 1) + 1)))*x^n, x], x], x]
/; FreeQ[{a, b, c, d, e, f, g, p, q}, x] && IGtQ[n, 0] && GtQ[m, n - 1]
Rule 3751
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
:> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[c*(ff/f), Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2
+ ff^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))
Rubi steps \begin{align*}
\text {integral}& = \frac {\text {Subst}\left (\int \frac {x^6}{\left (1+x^2\right ) \left (a+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f} \\ & = -\frac {a \tan ^3(e+f x)}{2 (a-b) b f \left (a+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {x^2 \left (3 a+(3 a-2 b) x^2\right )}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{2 (a-b) b f} \\ & = \frac {(3 a-2 b) \tan (e+f x)}{2 (a-b) b^2 f}-\frac {a \tan ^3(e+f x)}{2 (a-b) b f \left (a+b \tan ^2(e+f x)\right )}-\frac {\text {Subst}\left (\int \frac {a (3 a-2 b)+\left (3 a^2-2 a b-2 b^2\right ) x^2}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{2 (a-b) b^2 f} \\ & = \frac {(3 a-2 b) \tan (e+f x)}{2 (a-b) b^2 f}-\frac {a \tan ^3(e+f x)}{2 (a-b) b f \left (a+b \tan ^2(e+f x)\right )}-\frac {\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{(a-b)^2 f}-\frac {\left (a^2 (3 a-5 b)\right ) \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\tan (e+f x)\right )}{2 (a-b)^2 b^2 f} \\ & = -\frac {x}{(a-b)^2}-\frac {a^{3/2} (3 a-5 b) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{2 (a-b)^2 b^{5/2} f}+\frac {(3 a-2 b) \tan (e+f x)}{2 (a-b) b^2 f}-\frac {a \tan ^3(e+f x)}{2 (a-b) b f \left (a+b \tan ^2(e+f x)\right )} \\
\end{align*}
Mathematica [A] (verified)
Time = 1.36 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.91
\[
\int \frac {\tan ^6(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\frac {-\frac {2 (e+f x)}{(a-b)^2}-\frac {a^{3/2} (3 a-5 b) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{(a-b)^2 b^{5/2}}+\frac {a^2 \sin (2 (e+f x))}{(a-b) b^2 (a+b+(a-b) \cos (2 (e+f x)))}+\frac {2 \tan (e+f x)}{b^2}}{2 f}
\]
[In]
Integrate[Tan[e + f*x]^6/(a + b*Tan[e + f*x]^2)^2,x]
[Out]
((-2*(e + f*x))/(a - b)^2 - (a^(3/2)*(3*a - 5*b)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/((a - b)^2*b^(5/2)) +
(a^2*Sin[2*(e + f*x)])/((a - b)*b^2*(a + b + (a - b)*Cos[2*(e + f*x)])) + (2*Tan[e + f*x])/b^2)/(2*f)
Maple [A] (verified)
Time = 0.17 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.80
| | |
method | result | size |
| | |
derivativedivides |
\(\frac {\frac {\tan \left (f x +e \right )}{b^{2}}-\frac {a^{2} \left (\frac {\left (-\frac {a}{2}+\frac {b}{2}\right ) \tan \left (f x +e \right )}{a +b \tan \left (f x +e \right )^{2}}+\frac {\left (3 a -5 b \right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{2 \sqrt {a b}}\right )}{\left (a -b \right )^{2} b^{2}}-\frac {\arctan \left (\tan \left (f x +e \right )\right )}{\left (a -b \right )^{2}}}{f}\) |
\(104\) |
default |
\(\frac {\frac {\tan \left (f x +e \right )}{b^{2}}-\frac {a^{2} \left (\frac {\left (-\frac {a}{2}+\frac {b}{2}\right ) \tan \left (f x +e \right )}{a +b \tan \left (f x +e \right )^{2}}+\frac {\left (3 a -5 b \right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{2 \sqrt {a b}}\right )}{\left (a -b \right )^{2} b^{2}}-\frac {\arctan \left (\tan \left (f x +e \right )\right )}{\left (a -b \right )^{2}}}{f}\) |
\(104\) |
risch |
\(-\frac {x}{a^{2}-2 a b +b^{2}}+\frac {i \left (3 a^{3} {\mathrm e}^{4 i \left (f x +e \right )}-5 a^{2} b \,{\mathrm e}^{4 i \left (f x +e \right )}+6 a \,b^{2} {\mathrm e}^{4 i \left (f x +e \right )}-2 b^{3} {\mathrm e}^{4 i \left (f x +e \right )}+6 a^{3} {\mathrm e}^{2 i \left (f x +e \right )}-4 a^{2} b \,{\mathrm e}^{2 i \left (f x +e \right )}-4 a \,b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+4 b^{3} {\mathrm e}^{2 i \left (f x +e \right )}+3 a^{3}-7 a^{2} b +6 a \,b^{2}-2 b^{3}\right )}{f \,b^{2} \left (a -b \right )^{2} \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}-b \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+2 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a -b \right ) \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}-\frac {3 \sqrt {-a b}\, a^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{4 b^{3} \left (a -b \right )^{2} f}+\frac {5 \sqrt {-a b}\, a \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{4 b^{2} \left (a -b \right )^{2} f}+\frac {3 \sqrt {-a b}\, a^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{4 b^{3} \left (a -b \right )^{2} f}-\frac {5 \sqrt {-a b}\, a \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{4 b^{2} \left (a -b \right )^{2} f}\) |
\(466\) |
| | |
|
|
|
[In]
int(tan(f*x+e)^6/(a+b*tan(f*x+e)^2)^2,x,method=_RETURNVERBOSE)
[Out]
1/f*(1/b^2*tan(f*x+e)-a^2/(a-b)^2/b^2*((-1/2*a+1/2*b)*tan(f*x+e)/(a+b*tan(f*x+e)^2)+1/2*(3*a-5*b)/(a*b)^(1/2)*
arctan(b*tan(f*x+e)/(a*b)^(1/2)))-1/(a-b)^2*arctan(tan(f*x+e)))
Fricas [A] (verification not implemented)
none
Time = 0.30 (sec) , antiderivative size = 474, normalized size of antiderivative = 3.65
\[
\int \frac {\tan ^6(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\left [-\frac {8 \, b^{3} f x \tan \left (f x + e\right )^{2} + 8 \, a b^{2} f x - 8 \, {\left (a^{2} b - 2 \, a b^{2} + b^{3}\right )} \tan \left (f x + e\right )^{3} + {\left (3 \, a^{3} - 5 \, a^{2} b + {\left (3 \, a^{2} b - 5 \, a b^{2}\right )} \tan \left (f x + e\right )^{2}\right )} \sqrt {-\frac {a}{b}} \log \left (\frac {b^{2} \tan \left (f x + e\right )^{4} - 6 \, a b \tan \left (f x + e\right )^{2} + a^{2} + 4 \, {\left (b^{2} \tan \left (f x + e\right )^{3} - a b \tan \left (f x + e\right )\right )} \sqrt {-\frac {a}{b}}}{b^{2} \tan \left (f x + e\right )^{4} + 2 \, a b \tan \left (f x + e\right )^{2} + a^{2}}\right ) - 4 \, {\left (3 \, a^{3} - 5 \, a^{2} b + 2 \, a b^{2}\right )} \tan \left (f x + e\right )}{8 \, {\left ({\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} f \tan \left (f x + e\right )^{2} + {\left (a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4}\right )} f\right )}}, -\frac {4 \, b^{3} f x \tan \left (f x + e\right )^{2} + 4 \, a b^{2} f x - 4 \, {\left (a^{2} b - 2 \, a b^{2} + b^{3}\right )} \tan \left (f x + e\right )^{3} + {\left (3 \, a^{3} - 5 \, a^{2} b + {\left (3 \, a^{2} b - 5 \, a b^{2}\right )} \tan \left (f x + e\right )^{2}\right )} \sqrt {\frac {a}{b}} \arctan \left (\frac {{\left (b \tan \left (f x + e\right )^{2} - a\right )} \sqrt {\frac {a}{b}}}{2 \, a \tan \left (f x + e\right )}\right ) - 2 \, {\left (3 \, a^{3} - 5 \, a^{2} b + 2 \, a b^{2}\right )} \tan \left (f x + e\right )}{4 \, {\left ({\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} f \tan \left (f x + e\right )^{2} + {\left (a^{3} b^{2} - 2 \, a^{2} b^{3} + a b^{4}\right )} f\right )}}\right ]
\]
[In]
integrate(tan(f*x+e)^6/(a+b*tan(f*x+e)^2)^2,x, algorithm="fricas")
[Out]
[-1/8*(8*b^3*f*x*tan(f*x + e)^2 + 8*a*b^2*f*x - 8*(a^2*b - 2*a*b^2 + b^3)*tan(f*x + e)^3 + (3*a^3 - 5*a^2*b +
(3*a^2*b - 5*a*b^2)*tan(f*x + e)^2)*sqrt(-a/b)*log((b^2*tan(f*x + e)^4 - 6*a*b*tan(f*x + e)^2 + a^2 + 4*(b^2*t
an(f*x + e)^3 - a*b*tan(f*x + e))*sqrt(-a/b))/(b^2*tan(f*x + e)^4 + 2*a*b*tan(f*x + e)^2 + a^2)) - 4*(3*a^3 -
5*a^2*b + 2*a*b^2)*tan(f*x + e))/((a^2*b^3 - 2*a*b^4 + b^5)*f*tan(f*x + e)^2 + (a^3*b^2 - 2*a^2*b^3 + a*b^4)*f
), -1/4*(4*b^3*f*x*tan(f*x + e)^2 + 4*a*b^2*f*x - 4*(a^2*b - 2*a*b^2 + b^3)*tan(f*x + e)^3 + (3*a^3 - 5*a^2*b
+ (3*a^2*b - 5*a*b^2)*tan(f*x + e)^2)*sqrt(a/b)*arctan(1/2*(b*tan(f*x + e)^2 - a)*sqrt(a/b)/(a*tan(f*x + e)))
- 2*(3*a^3 - 5*a^2*b + 2*a*b^2)*tan(f*x + e))/((a^2*b^3 - 2*a*b^4 + b^5)*f*tan(f*x + e)^2 + (a^3*b^2 - 2*a^2*b
^3 + a*b^4)*f)]
Sympy [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 2859 vs. \(2 (102) = 204\).
Time = 40.30 (sec) , antiderivative size = 2859, normalized size of antiderivative = 21.99
\[
\int \frac {\tan ^6(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\text {Too large to display}
\]
[In]
integrate(tan(f*x+e)**6/(a+b*tan(f*x+e)**2)**2,x)
[Out]
Piecewise((zoo*x*tan(e)**2, Eq(a, 0) & Eq(b, 0) & Eq(f, 0)), ((-x + tan(e + f*x)**5/(5*f) - tan(e + f*x)**3/(3
*f) + tan(e + f*x)/f)/a**2, Eq(b, 0)), ((-x + tan(e + f*x)/f)/b**2, Eq(a, 0)), (-15*f*x*tan(e + f*x)**4/(8*b**
2*f*tan(e + f*x)**4 + 16*b**2*f*tan(e + f*x)**2 + 8*b**2*f) - 30*f*x*tan(e + f*x)**2/(8*b**2*f*tan(e + f*x)**4
+ 16*b**2*f*tan(e + f*x)**2 + 8*b**2*f) - 15*f*x/(8*b**2*f*tan(e + f*x)**4 + 16*b**2*f*tan(e + f*x)**2 + 8*b*
*2*f) + 8*tan(e + f*x)**5/(8*b**2*f*tan(e + f*x)**4 + 16*b**2*f*tan(e + f*x)**2 + 8*b**2*f) + 25*tan(e + f*x)*
*3/(8*b**2*f*tan(e + f*x)**4 + 16*b**2*f*tan(e + f*x)**2 + 8*b**2*f) + 15*tan(e + f*x)/(8*b**2*f*tan(e + f*x)*
*4 + 16*b**2*f*tan(e + f*x)**2 + 8*b**2*f), Eq(a, b)), (x*tan(e)**6/(a + b*tan(e)**2)**2, Eq(f, 0)), (-3*a**4*
log(-sqrt(-a/b) + tan(e + f*x))/(4*a**3*b**3*f*sqrt(-a/b) + 4*a**2*b**4*f*sqrt(-a/b)*tan(e + f*x)**2 - 8*a**2*
b**4*f*sqrt(-a/b) - 8*a*b**5*f*sqrt(-a/b)*tan(e + f*x)**2 + 4*a*b**5*f*sqrt(-a/b) + 4*b**6*f*sqrt(-a/b)*tan(e
+ f*x)**2) + 3*a**4*log(sqrt(-a/b) + tan(e + f*x))/(4*a**3*b**3*f*sqrt(-a/b) + 4*a**2*b**4*f*sqrt(-a/b)*tan(e
+ f*x)**2 - 8*a**2*b**4*f*sqrt(-a/b) - 8*a*b**5*f*sqrt(-a/b)*tan(e + f*x)**2 + 4*a*b**5*f*sqrt(-a/b) + 4*b**6*
f*sqrt(-a/b)*tan(e + f*x)**2) + 6*a**3*b*sqrt(-a/b)*tan(e + f*x)/(4*a**3*b**3*f*sqrt(-a/b) + 4*a**2*b**4*f*sqr
t(-a/b)*tan(e + f*x)**2 - 8*a**2*b**4*f*sqrt(-a/b) - 8*a*b**5*f*sqrt(-a/b)*tan(e + f*x)**2 + 4*a*b**5*f*sqrt(-
a/b) + 4*b**6*f*sqrt(-a/b)*tan(e + f*x)**2) - 3*a**3*b*log(-sqrt(-a/b) + tan(e + f*x))*tan(e + f*x)**2/(4*a**3
*b**3*f*sqrt(-a/b) + 4*a**2*b**4*f*sqrt(-a/b)*tan(e + f*x)**2 - 8*a**2*b**4*f*sqrt(-a/b) - 8*a*b**5*f*sqrt(-a/
b)*tan(e + f*x)**2 + 4*a*b**5*f*sqrt(-a/b) + 4*b**6*f*sqrt(-a/b)*tan(e + f*x)**2) + 5*a**3*b*log(-sqrt(-a/b) +
tan(e + f*x))/(4*a**3*b**3*f*sqrt(-a/b) + 4*a**2*b**4*f*sqrt(-a/b)*tan(e + f*x)**2 - 8*a**2*b**4*f*sqrt(-a/b)
- 8*a*b**5*f*sqrt(-a/b)*tan(e + f*x)**2 + 4*a*b**5*f*sqrt(-a/b) + 4*b**6*f*sqrt(-a/b)*tan(e + f*x)**2) + 3*a*
*3*b*log(sqrt(-a/b) + tan(e + f*x))*tan(e + f*x)**2/(4*a**3*b**3*f*sqrt(-a/b) + 4*a**2*b**4*f*sqrt(-a/b)*tan(e
+ f*x)**2 - 8*a**2*b**4*f*sqrt(-a/b) - 8*a*b**5*f*sqrt(-a/b)*tan(e + f*x)**2 + 4*a*b**5*f*sqrt(-a/b) + 4*b**6
*f*sqrt(-a/b)*tan(e + f*x)**2) - 5*a**3*b*log(sqrt(-a/b) + tan(e + f*x))/(4*a**3*b**3*f*sqrt(-a/b) + 4*a**2*b*
*4*f*sqrt(-a/b)*tan(e + f*x)**2 - 8*a**2*b**4*f*sqrt(-a/b) - 8*a*b**5*f*sqrt(-a/b)*tan(e + f*x)**2 + 4*a*b**5*
f*sqrt(-a/b) + 4*b**6*f*sqrt(-a/b)*tan(e + f*x)**2) + 4*a**2*b**2*sqrt(-a/b)*tan(e + f*x)**3/(4*a**3*b**3*f*sq
rt(-a/b) + 4*a**2*b**4*f*sqrt(-a/b)*tan(e + f*x)**2 - 8*a**2*b**4*f*sqrt(-a/b) - 8*a*b**5*f*sqrt(-a/b)*tan(e +
f*x)**2 + 4*a*b**5*f*sqrt(-a/b) + 4*b**6*f*sqrt(-a/b)*tan(e + f*x)**2) - 10*a**2*b**2*sqrt(-a/b)*tan(e + f*x)
/(4*a**3*b**3*f*sqrt(-a/b) + 4*a**2*b**4*f*sqrt(-a/b)*tan(e + f*x)**2 - 8*a**2*b**4*f*sqrt(-a/b) - 8*a*b**5*f*
sqrt(-a/b)*tan(e + f*x)**2 + 4*a*b**5*f*sqrt(-a/b) + 4*b**6*f*sqrt(-a/b)*tan(e + f*x)**2) + 5*a**2*b**2*log(-s
qrt(-a/b) + tan(e + f*x))*tan(e + f*x)**2/(4*a**3*b**3*f*sqrt(-a/b) + 4*a**2*b**4*f*sqrt(-a/b)*tan(e + f*x)**2
- 8*a**2*b**4*f*sqrt(-a/b) - 8*a*b**5*f*sqrt(-a/b)*tan(e + f*x)**2 + 4*a*b**5*f*sqrt(-a/b) + 4*b**6*f*sqrt(-a
/b)*tan(e + f*x)**2) - 5*a**2*b**2*log(sqrt(-a/b) + tan(e + f*x))*tan(e + f*x)**2/(4*a**3*b**3*f*sqrt(-a/b) +
4*a**2*b**4*f*sqrt(-a/b)*tan(e + f*x)**2 - 8*a**2*b**4*f*sqrt(-a/b) - 8*a*b**5*f*sqrt(-a/b)*tan(e + f*x)**2 +
4*a*b**5*f*sqrt(-a/b) + 4*b**6*f*sqrt(-a/b)*tan(e + f*x)**2) - 4*a*b**3*f*x*sqrt(-a/b)/(4*a**3*b**3*f*sqrt(-a/
b) + 4*a**2*b**4*f*sqrt(-a/b)*tan(e + f*x)**2 - 8*a**2*b**4*f*sqrt(-a/b) - 8*a*b**5*f*sqrt(-a/b)*tan(e + f*x)*
*2 + 4*a*b**5*f*sqrt(-a/b) + 4*b**6*f*sqrt(-a/b)*tan(e + f*x)**2) - 8*a*b**3*sqrt(-a/b)*tan(e + f*x)**3/(4*a**
3*b**3*f*sqrt(-a/b) + 4*a**2*b**4*f*sqrt(-a/b)*tan(e + f*x)**2 - 8*a**2*b**4*f*sqrt(-a/b) - 8*a*b**5*f*sqrt(-a
/b)*tan(e + f*x)**2 + 4*a*b**5*f*sqrt(-a/b) + 4*b**6*f*sqrt(-a/b)*tan(e + f*x)**2) + 4*a*b**3*sqrt(-a/b)*tan(e
+ f*x)/(4*a**3*b**3*f*sqrt(-a/b) + 4*a**2*b**4*f*sqrt(-a/b)*tan(e + f*x)**2 - 8*a**2*b**4*f*sqrt(-a/b) - 8*a*
b**5*f*sqrt(-a/b)*tan(e + f*x)**2 + 4*a*b**5*f*sqrt(-a/b) + 4*b**6*f*sqrt(-a/b)*tan(e + f*x)**2) - 4*b**4*f*x*
sqrt(-a/b)*tan(e + f*x)**2/(4*a**3*b**3*f*sqrt(-a/b) + 4*a**2*b**4*f*sqrt(-a/b)*tan(e + f*x)**2 - 8*a**2*b**4*
f*sqrt(-a/b) - 8*a*b**5*f*sqrt(-a/b)*tan(e + f*x)**2 + 4*a*b**5*f*sqrt(-a/b) + 4*b**6*f*sqrt(-a/b)*tan(e + f*x
)**2) + 4*b**4*sqrt(-a/b)*tan(e + f*x)**3/(4*a**3*b**3*f*sqrt(-a/b) + 4*a**2*b**4*f*sqrt(-a/b)*tan(e + f*x)**2
- 8*a**2*b**4*f*sqrt(-a/b) - 8*a*b**5*f*sqrt(-a/b)*tan(e + f*x)**2 + 4*a*b**5*f*sqrt(-a/b) + 4*b**6*f*sqrt(-a
/b)*tan(e + f*x)**2), True))
Maxima [A] (verification not implemented)
none
Time = 0.35 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.04
\[
\int \frac {\tan ^6(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\frac {\frac {a^{2} \tan \left (f x + e\right )}{a^{2} b^{2} - a b^{3} + {\left (a b^{3} - b^{4}\right )} \tan \left (f x + e\right )^{2}} - \frac {{\left (3 \, a^{3} - 5 \, a^{2} b\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )}{{\left (a^{2} b^{2} - 2 \, a b^{3} + b^{4}\right )} \sqrt {a b}} - \frac {2 \, {\left (f x + e\right )}}{a^{2} - 2 \, a b + b^{2}} + \frac {2 \, \tan \left (f x + e\right )}{b^{2}}}{2 \, f}
\]
[In]
integrate(tan(f*x+e)^6/(a+b*tan(f*x+e)^2)^2,x, algorithm="maxima")
[Out]
1/2*(a^2*tan(f*x + e)/(a^2*b^2 - a*b^3 + (a*b^3 - b^4)*tan(f*x + e)^2) - (3*a^3 - 5*a^2*b)*arctan(b*tan(f*x +
e)/sqrt(a*b))/((a^2*b^2 - 2*a*b^3 + b^4)*sqrt(a*b)) - 2*(f*x + e)/(a^2 - 2*a*b + b^2) + 2*tan(f*x + e)/b^2)/f
Giac [A] (verification not implemented)
none
Time = 2.20 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.10
\[
\int \frac {\tan ^6(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\frac {\frac {a^{2} \tan \left (f x + e\right )}{{\left (a b^{2} - b^{3}\right )} {\left (b \tan \left (f x + e\right )^{2} + a\right )}} - \frac {{\left (3 \, a^{3} - 5 \, a^{2} b\right )} {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )\right )}}{{\left (a^{2} b^{2} - 2 \, a b^{3} + b^{4}\right )} \sqrt {a b}} - \frac {2 \, {\left (f x + e\right )}}{a^{2} - 2 \, a b + b^{2}} + \frac {2 \, \tan \left (f x + e\right )}{b^{2}}}{2 \, f}
\]
[In]
integrate(tan(f*x+e)^6/(a+b*tan(f*x+e)^2)^2,x, algorithm="giac")
[Out]
1/2*(a^2*tan(f*x + e)/((a*b^2 - b^3)*(b*tan(f*x + e)^2 + a)) - (3*a^3 - 5*a^2*b)*(pi*floor((f*x + e)/pi + 1/2)
*sgn(b) + arctan(b*tan(f*x + e)/sqrt(a*b)))/((a^2*b^2 - 2*a*b^3 + b^4)*sqrt(a*b)) - 2*(f*x + e)/(a^2 - 2*a*b +
b^2) + 2*tan(f*x + e)/b^2)/f
Mupad [B] (verification not implemented)
Time = 12.81 (sec) , antiderivative size = 2581, normalized size of antiderivative = 19.85
\[
\int \frac {\tan ^6(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\text {Too large to display}
\]
[In]
int(tan(e + f*x)^6/(a + b*tan(e + f*x)^2)^2,x)
[Out]
(2*atan((((((4*a*b^8 - 22*a^2*b^7 + 48*a^3*b^6 - 52*a^4*b^5 + 28*a^5*b^4 - 6*a^6*b^3)*1i)/(3*a*b^5 - b^6 - 3*a
^2*b^4 + a^3*b^3) - (tan(e + f*x)*(16*b^10 - 48*a*b^9 + 32*a^2*b^8 + 32*a^3*b^7 - 48*a^4*b^6 + 16*a^5*b^5))/(2
*(b^5 - 2*a*b^4 + a^2*b^3)*(2*a^2 - 4*a*b + 2*b^2)))/(2*a^2 - 4*a*b + 2*b^2) + (tan(e + f*x)*(9*a^6 - 30*a^5*b
+ 4*b^6 + 25*a^4*b^2))/(2*(b^5 - 2*a*b^4 + a^2*b^3)))/(2*a^2 - 4*a*b + 2*b^2) - ((((4*a*b^8 - 22*a^2*b^7 + 48
*a^3*b^6 - 52*a^4*b^5 + 28*a^5*b^4 - 6*a^6*b^3)*1i)/(3*a*b^5 - b^6 - 3*a^2*b^4 + a^3*b^3) + (tan(e + f*x)*(16*
b^10 - 48*a*b^9 + 32*a^2*b^8 + 32*a^3*b^7 - 48*a^4*b^6 + 16*a^5*b^5))/(2*(b^5 - 2*a*b^4 + a^2*b^3)*(2*a^2 - 4*
a*b + 2*b^2)))/(2*a^2 - 4*a*b + 2*b^2) - (tan(e + f*x)*(9*a^6 - 30*a^5*b + 4*b^6 + 25*a^4*b^2))/(2*(b^5 - 2*a*
b^4 + a^2*b^3)))/(2*a^2 - 4*a*b + 2*b^2))/((((((4*a*b^8 - 22*a^2*b^7 + 48*a^3*b^6 - 52*a^4*b^5 + 28*a^5*b^4 -
6*a^6*b^3)*1i)/(3*a*b^5 - b^6 - 3*a^2*b^4 + a^3*b^3) - (tan(e + f*x)*(16*b^10 - 48*a*b^9 + 32*a^2*b^8 + 32*a^3
*b^7 - 48*a^4*b^6 + 16*a^5*b^5))/(2*(b^5 - 2*a*b^4 + a^2*b^3)*(2*a^2 - 4*a*b + 2*b^2)))*1i)/(2*a^2 - 4*a*b + 2
*b^2) + (tan(e + f*x)*(9*a^6 - 30*a^5*b + 4*b^6 + 25*a^4*b^2)*1i)/(2*(b^5 - 2*a*b^4 + a^2*b^3)))/(2*a^2 - 4*a*
b + 2*b^2) - ((9*a^5)/2 - (21*a^4*b)/2 + 5*a^2*b^3 + 2*a^3*b^2)/(3*a*b^5 - b^6 - 3*a^2*b^4 + a^3*b^3) + (((((4
*a*b^8 - 22*a^2*b^7 + 48*a^3*b^6 - 52*a^4*b^5 + 28*a^5*b^4 - 6*a^6*b^3)*1i)/(3*a*b^5 - b^6 - 3*a^2*b^4 + a^3*b
^3) + (tan(e + f*x)*(16*b^10 - 48*a*b^9 + 32*a^2*b^8 + 32*a^3*b^7 - 48*a^4*b^6 + 16*a^5*b^5))/(2*(b^5 - 2*a*b^
4 + a^2*b^3)*(2*a^2 - 4*a*b + 2*b^2)))*1i)/(2*a^2 - 4*a*b + 2*b^2) - (tan(e + f*x)*(9*a^6 - 30*a^5*b + 4*b^6 +
25*a^4*b^2)*1i)/(2*(b^5 - 2*a*b^4 + a^2*b^3)))/(2*a^2 - 4*a*b + 2*b^2))))/(f*(2*a^2 - 4*a*b + 2*b^2)) + tan(e
+ f*x)/(b^2*f) + (a^2*tan(e + f*x))/(2*f*(a - b)*(a*b^2 + b^3*tan(e + f*x)^2)) - (atan((((3*a - 5*b)*(-a^3*b^
5)^(1/2)*((tan(e + f*x)*(9*a^6 - 30*a^5*b + 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